﻿using AdminSystem.Application;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace AdminSystem.WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    [ApiExplorerSettings(GroupName = "v1")]
    public class QuartzNetController : ControllerBase
    {
        private readonly IQuartzDemoService quartzDemoService;

        public QuartzNetController(IQuartzDemoService quartzDemoService)
        {
            this.quartzDemoService = quartzDemoService;
        }

        [HttpGet]
        public async Task<IActionResult> Run()
        {
            await quartzDemoService.Run();
            return Ok();
        }
    }
}
